package com.kmxd.ams.client.archive;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kmxd.ams.client.archive.dto.ArchiveRuleCatalogAddDTO;
import com.kmxd.ams.client.archive.dto.ArchiveRuleCatalogEditDTO;
import com.kmxd.ams.client.archive.dto.ArchiveRuleCatalogQueryDTO;
import com.kmxd.ams.client.archive.vo.ArchiveRuleCatalogListVO;
import com.kmxd.ams.client.archive.vo.ArchiveRuleCatalogVO;
import com.kmxd.ams.infra.archive.entity.ArchiveRuleCatalog;
import org.springframework.cache.annotation.CacheEvict;

import java.util.List;

/**
 * 整理规则-目录树设置 服务类
 *
 * @author nickbi
 * @since 2022-07-30
 */
public interface IArchiveRuleCatalogSvc extends IService<ArchiveRuleCatalog> {

  /**
   * 分页查询
   *
   * @param reqPage
   * @param req
   * @return
   */
  Page<ArchiveRuleCatalogListVO> selectPage(Page reqPage, ArchiveRuleCatalogQueryDTO req);

  /**
   * 查询列表
   *
   * @param req
   * @return
   */
  List<ArchiveRuleCatalogListVO> selectList(ArchiveRuleCatalogQueryDTO req);

  /**
   * 新增
   *
   * @param req
   */
  void add(ArchiveRuleCatalogAddDTO req);

  /**
   * 修改
   *
   * @param req
   */
  void edit(ArchiveRuleCatalogEditDTO req);

  /**
   * 删除
   *
   * @param ids
   */
  void remove(String ids);

  /**
   * 查看
   *
   * @param id
   * @return
   */
  ArchiveRuleCatalogVO view(Long id);

  void initArchNode(Long archTypeId);

  boolean getCustomFlag(Long comId, Long fondsId, Integer status);

  void changeCustomFlag(Long comId, Long fondsId, Integer status, Boolean flag);

    @CacheEvict(allEntries = true)
    void changeSort(String ids);
}
